<div id="left-bar">
	<div class="entregas-content">	
            <?php if($this->Session->read('Auth.User')){ ?>
		<b>Entregas</b>
                <?php $mod = ClassRegistry::init('Atendimento');
                    $at = $mod->find('all', array(
                        'conditions' => array(
                            'isnull(ic_ativo_atendimento_sim_nao) or ic_ativo_atendimento_sim_nao = false'
                        )
                    ));
                    ?>
<!--		<div>
			<span class="count">1</span><span class="entregue">SV001</span><br>
		</div>
		<div>
			<span class="count">2</span><span class="transito">SV001</span><br>
		</div>
		<div>
			<span class="count">3</span><span class="entregue">SV001</span><br>
		</div>
		<div>
			<span class="count">4</span><span class="atrasado">SV001</span><br>
		</div>
		<div>
			<span class="count">5</span><span class="entregue">SV001</span><br>
		</div>
		<div>
			<span class="count">6</span><span class="transito">SV001</span><br>
		</div>-->
<!--<ul class='ul_view_col'>-->
             <?php
             $cont=0;
             foreach ($at as $a):
            ?>
            <div><span class="count"><?php echo ++$cont; ?></span><span class="entregue"><?php echo $this->Html->link($a['Atendimento']['id'], array('controller'=>'atendimentos','action'=>'visualizar',$a['Atendimento']['id']) )?></span></div>
            <?php  endforeach;
    }
            ?>
            <!--</ul>-->
	</div>
	<div class="entregas-content top-less">
            <?php 
            
            //echo $this->Html->link('Sair', array('controller'=>'usuarios','action'=>'logout'));
            ?>
		<b>Entregadores</b>
                <?php 
                //print_r()
                
                    $mod = ClassRegistry::init('Usuario');
                    $user = $mod->find('all');
                    $cont = 0;
                    //print_r($user);
                ?>
                <?php foreach ($user as $u):?>
                <?php 
                $at = $u['Atendimento'];
                $ocupado = true;
                
                foreach($at as $a){
                    if($a['ic_ativo_atendimento_sim_nao']==true){
                        $ocupado= false;
                    }
                }
                ?>
                <div><span class='count'><?php echo ++$cont ?></span><span class="entregue"><?php echo $u['Usuario']['nm_usuario'] ?></span></div>
                <?php endforeach;
                ?>
<!--		<div>
			<span class="count">1</span><span class="entregue">Elias</span><br>
		</div>
		<div>
			<span class="count">2</span><span class="transito">Joyvis</span><br>
		</div>
		<div>
			<span class="count">3</span><span class="entregue">Carlos</span><br>
		</div>
		<div>
			<span class="count">4</span><span class="atrasado">Gibão Vida Loka</span><br>
		</div>
		<div>
			<span class="count">5</span><span class="entregue">Rafael</span><br>
		</div>
		<div>
			<span class="count">6</span><span class="transito">Carlos</span><br>
		</div>-->

	</div>
</div>
